home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 May / Macworld (1998-05).dmg / Games World / Shareware Games / Arcade / Mission of Doom / Mission of Doom.DXR / 00009.ls < prev    next >
Encoding:
Text File  |  1995-12-11  |  5.5 KB  |  231 lines

  1. on startMovie
  2.   global mh, vH, rightincrementH, leftincrementH, incrementV, shot, targetcount, hits
  3.   set targetcount to 0
  4.   set hits to 0
  5.   cursor(2)
  6.   puppetSprite(30, 1)
  7.   puppetSprite(33, 1)
  8.   puppetSprite(37, 1)
  9.   puppetSprite(38, 1)
  10.   set the visible of sprite 48 to 0
  11.   set the visible of sprite 25 to 0
  12.   set the visible of sprite 33 to 0
  13.   set the visible of sprite 30 to 0
  14.   set the visible of sprite 34 to 0
  15.   set the visible of sprite 35 to 0
  16. end
  17.  
  18. on WAIT howlong
  19.   startTimer()
  20.   repeat while the timer < howlong
  21.   end repeat
  22. end
  23.  
  24. on PPC
  25.   global mh, mV, rightincrementH, leftincrementH, incrementV, shot, gun
  26.   set mh to the mouseH
  27.   set mV to the mouseV
  28.   set incrementV to 0
  29.   puppetSound(1, 14)
  30.   set the visible of sprite 34 to 1
  31.   set the visible of sprite 35 to 1
  32.   set the visible of sprite 30 to 0
  33.   set rightincrementH to (587 - mh) / 10
  34.   set leftincrementH to (mh - 47) / 10
  35.   set incrementV to (294 - mV) / 10
  36.   set the locH of sprite 34 to 587
  37.   set the locV of sprite 34 to 294
  38.   set the locH of sprite 35 to 47
  39.   set the locV of sprite 35 to 294
  40.   set the width of sprite 34 to 53
  41.   set the height of sprite 34 to 53
  42.   set the width of sprite 35 to 53
  43.   set the height of sprite 35 to 53
  44.   set the castNum of sprite 30 to 81
  45.   set the locH of sprite 30 to mh
  46.   set the locV of sprite 30 to mV
  47.   set the locH of sprite 47 to mh
  48.   set the locV of sprite 47 to mV
  49.   set shot to 1
  50.   checkPPC()
  51. end
  52.  
  53. on checkPPC
  54.   global mh, mV, rightincrementH, leftincrementH, incrementV, shot
  55.   puppetSprite(34, 1)
  56.   puppetSprite(35, 1)
  57.   if shot < 11 then
  58.     set the width of sprite 34 to the width of sprite 34 - 5
  59.     set the height of sprite 34 to the height of sprite 34 - 5
  60.     set the width of sprite 35 to the width of sprite 35 - 5
  61.     set the height of sprite 35 to the height of sprite 35 - 5
  62.     set the locH of sprite 34 to the locH of sprite 34 - rightincrementH
  63.     set the locV of sprite 34 to the locV of sprite 34 - incrementV
  64.     set the locH of sprite 35 to the locH of sprite 35 + leftincrementH
  65.     set the locV of sprite 35 to the locV of sprite 35 - incrementV
  66.     set shot to shot + 1
  67.     if shot = 10 then
  68.       set the visible of sprite 30 to 1
  69.       puppetSound(1, 30)
  70.     else
  71.       nothing()
  72.     end if
  73.   else
  74.     checkfire()
  75.     set the visible of sprite 34 to 0
  76.     set the visible of sprite 35 to 0
  77.   end if
  78. end
  79.  
  80. on alienhands
  81.   if the mouseV < 50 then
  82.     set the castNum of sprite 37 to 17
  83.   else
  84.     if the mouseV < 100 then
  85.       set the castNum of sprite 37 to 18
  86.     else
  87.       if the mouseV < 150 then
  88.         set the castNum of sprite 37 to 19
  89.       else
  90.         if the mouseV < 200 then
  91.           set the castNum of sprite 37 to 20
  92.         else
  93.           if the mouseV < 250 then
  94.             set the castNum of sprite 37 to 21
  95.           else
  96.             set the castNum of sprite 37 to 22
  97.           end if
  98.         end if
  99.       end if
  100.     end if
  101.   end if
  102.   if the mouseH < 110 then
  103.     set the castNum of sprite 38 to 38
  104.   else
  105.     if the mouseH < 220 then
  106.       set the castNum of sprite 38 to 37
  107.     else
  108.       if the mouseH < 330 then
  109.         set the castNum of sprite 38 to 36
  110.       else
  111.         if the mouseH < 440 then
  112.           set the castNum of sprite 38 to 35
  113.         else
  114.           if the mouseH < 550 then
  115.             set the castNum of sprite 38 to 34
  116.           else
  117.             set the castNum of sprite 38 to 33
  118.           end if
  119.         end if
  120.       end if
  121.     end if
  122.   end if
  123. end
  124.  
  125. on target
  126.   set x to random(10)
  127.   if x = 1 then
  128.     go("caddy")
  129.   else
  130.     if x = 2 then
  131.       go("jet")
  132.     else
  133.       if x = 3 then
  134.         go("tank1")
  135.       else
  136.         if x = 4 then
  137.           go("tank2")
  138.         else
  139.           if x = 5 then
  140.             go("whitecar")
  141.           else
  142.             if x = 6 then
  143.               go("f18")
  144.             else
  145.               go(the frame - 2)
  146.             end if
  147.           end if
  148.         end if
  149.       end if
  150.     end if
  151.   end if
  152. end
  153.  
  154. on checkfire
  155.   set the castNum of sprite 30 to the castNum of sprite 30 + 1
  156.   if the castNum of sprite 30 = 111 then
  157.     set the visible of sprite 30 to 0
  158.     set the castNum of sprite 30 to 81
  159.   end if
  160.   updateStage()
  161. end
  162.  
  163. on explosion
  164.   global mh, mV, hits
  165.   set the locH of sprite 25 to mh
  166.   set the locV of sprite 25 to mV
  167.   set the visible of sprite 25 to 1
  168.   repeat with y = 1 to 3
  169.     repeat with x = 75 to 78
  170.       set the castNum of sprite 25 to x
  171.       updateStage()
  172.     end repeat
  173.   end repeat
  174.   set the visible of sprite 25 to 0
  175.   set laff to random(4)
  176.   if laff = 1 then
  177.     go("laugh3")
  178.   else
  179.     if laff = 2 then
  180.       go("laugh2")
  181.     else
  182.       go("laugh1")
  183.     end if
  184.   end if
  185.   set hits to hits + 1
  186.   set the castNum of sprite 33 to the castNum of sprite 33 + 1
  187.   if the castNum of sprite 33 > 126 then
  188.     set the visible of sprite 34 to 0
  189.     set the visible of sprite 35 to 0
  190.     go("flyup")
  191.   end if
  192. end
  193.  
  194. on checkscore
  195.   go("flyup")
  196. end
  197.  
  198. on checkcityhits
  199.   repeat with x = 11 to 12
  200.     if (the width of sprite 34 < 5) and sprite 47 intersects x then
  201.       explosion()
  202.     end if
  203.   end repeat
  204.   repeat with x = 16 to 17
  205.     if (the width of sprite 34 < 5) and sprite 47 intersects x then
  206.       explosion()
  207.     end if
  208.   end repeat
  209. end
  210.  
  211. on reinitialize
  212.   global mh, vH, rightincrementH, leftincrementH, incrementV, shot, targetcount, hits
  213.   set targetcount to 0
  214.   set hits to 0
  215.   set the castNum of sprite 33 to 114
  216.   set the visible of sprite 25 to 0
  217.   set the visible of sprite 33 to 0
  218.   set the visible of sprite 30 to 0
  219.   set the visible of sprite 34 to 0
  220.   set the visible of sprite 35 to 0
  221. end
  222.  
  223. on progress
  224.   global hits
  225.   if hits > 5 then
  226.     go("goodprog")
  227.   else
  228.     go("badprog")
  229.   end if
  230. end
  231.